﻿#pragma once
#include "CodeGen.h"
class StringLiteGen :
	public CodeGen
{
public:
	std::string str;
	llvm::Value* value = nullptr;
public:
	virtual llvm::Value* generateCode(llvm::Module *m, llvm::Function *func, llvm::IRBuilder<>& builder) {
		if (!value) 
			value = builder.CreateGlobalStringPtr(str, str);
		return value;
	}
};

